<template>
  <el-form
    label-width="auto"
    label-position="top"
    class="demo-ruleForm"
    style="margin-top: 20px"
  >
    <el-form-item label="七、责任条款：">
      <el-input v-model="ruleForm.liabilityTerms" type="textarea" />
    </el-form-item>
  </el-form>
</template>

<script setup>
  const $baseMessage = inject('$baseMessage')

  const ruleForm = reactive({
    liabilityTerms: '',
  })

  const getFormData = () => {
    for (const key in ruleForm) {
      if (!ruleForm[key]) {
        $baseMessage('请填写责任条款', 'error')
        return false
      }
    }
    return ruleForm
  }

  const setFormData = ({ projectPlanTaskInfo }) => {
    for (const key in ruleForm) {
      ruleForm[key] = projectPlanTaskInfo[key]
    }
  }

  defineExpose({ getFormData, setFormData })
</script>

<style lang="scss" scoped></style>
